Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Interaction System Update #1989

Merged
merged 1 commit into from
Mar 1, 2024
Merged

[MIRROR] Interaction System Update #1989

merged 1 commit into from
Mar 1, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Original PR: NovaSector/NovaSector#863

About The Pull Request

This PR includes a modest refactor, bugfix, and feature update to the interaction system.

If you are merging this PR on a downstream repository, please feel free to download the updated JSON files:
Download updated-interactions.zip from Google Drive

Granular list of changes:

  • Fixed a bug which was causing self-interactions to be usable on people other than yourself.

  • Fixed a severe bug which was causing the interaction menu to call sleep and block processing of DCS signals:

    • The bug was caused by sleeping/long-blocking calls to TGUI being executed from within the open_interaction_menu DCS signal handler. I fixed the issue by using INVOKE_ASYNC on the offending function calls.
      (Sleeping/Blocking calls made from within DCS signal handlers are not allowed. Critical warnings are thrown in logs.)
    • The original developer seems to have purposely bypassed the no-sleep rule by removing the SIGNAL_HANDFLER header. Such a header is literally only composed of SHOULD_NOT_SLEEP(TRUE) which immediately throws warnings due to the blocking calls to TGUI which take place in the interaction menu.
    • The act proc blocks via calling TGUI as well, so I moved the offending code to an asynchronous apply_effects proc.
  • Fixed the sound_possible and sound_use parameters, which were non-functional due to developer error:

    • Sounds were not working at all because SEND_SOUND was being called in a for-loop with erroneous input operands.
    • Due to using SEND_SOUND, interactions were not using the sound_range parameter when they were expected to.
    • Replaced the prior sound implementation with a single call to playsound.
    • Added a new boolean parameter to interactions, sound_vary, an input operand to playsound to randomly change pitch.
  • Added a new pronoun template system to interactions using replacetext:

    • When messages are displayed to the players, template tags are dynamically replaced with the mob's pronouns.
    • Old versions of interactions will continue to work as expected. I will supply updated JSON files to the head maintainer.
    • Pronoun template tags may be used within interaction parameters message, target_messages, and user_messages.
    • The new template tags are as follows:
      • %TARGET_PRONOUN_THEIR%
      • %TARGET_PRONOUN_THEM%
      • %TARGET_PRONOUN_THEY%
      • %USER_PRONOUN_THEIR%
      • %USER_PRONOUN_THEM%
      • %USER_PRONOUN_THEY%

How This Contributes To The Nova Sector Roleplay Experience

This PR helps to make interactions a bit more personable by including the expected gender pronouns in interactions messages. Additionally, I identified and repaired minor and severe bugs. I fixed a minor bug which was preventing interaction sounds from working as expected, and a severe bug which was causing the DCS to sleep/block execution when it isn't expected.

While not included in this PR, I have also updated all of the interaction JSON files with pronoun tags and sound effects; the updated JSON files will be transmitted to the head maintainer for later addition.

Proof of Testing

I've been testing the updated code in an invite-only server for some time. I have also tested on the most recent Nova Sector build.

Screenshots/Videos

Screenshot 2024-02-08 221337
Screenshot 2024-02-08 221353

Changelog

🆑 A.C.M.O.
fix: Fixed a bug which was causing signal handling to briefly freeze upon opening and using the interaction menu.
fix: Fixed a bug which was preventing playing sounds from interactions.
fix: Fixed a bug which was causing self-interactions to be usable on people other than yourself.
refactor: Added a template system to interactions to enable expected gender pronoun usage.
/:cl:

* Fix open_interaction_menu proc to properly label itself as a DCS signal handler, added INVOKE_ASYNC usage to ui_interact call.

* Refactor interaction datum. Bugfix nonfunctional interaction sounds. Add sound_vary parameter to interactions. Add pronoun usage to interactions. Allow interactions to cause pain even if not lewd. Add INVOKE_ASYNC usage to interaction effects.
Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself.

@github-actions github-actions bot added the Stale label Feb 23, 2024
@github-actions github-actions bot closed this Mar 1, 2024
@Iajret Iajret reopened this Mar 1, 2024
@Iajret Iajret enabled auto-merge (squash) March 1, 2024 12:55
@Iajret Iajret merged commit 4b1c301 into master Mar 1, 2024
45 checks passed
AnywayFarus added a commit that referenced this pull request Mar 1, 2024
@Iajret Iajret deleted the upstream-mirror-863 branch March 2, 2024 19:22
Iajret pushed a commit that referenced this pull request Apr 14, 2024
* Fixes a critical spelling mistake (#82651)

## About The Pull Request

See title

## Why It's Good For The Game

Spell word good is good.

## Changelog
:cl:
spellcheck: Pre-Approved Cyborg Candidates are no longer "Cantidates"
/:cl:

* Fixes a critical spelling mistake

---------

Co-authored-by: Thunder12345 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants